#include "StdAfx.h"
#include "I3DSFile.h"
#include "file_read_3ds.h"
namespace ds3{

	class I3DSFile_imp
	{
		file_read_3ds m_3ds;
	public:
		bool loadFromFile(const TCHAR*path)
		{
			return m_3ds.loadFromFile(path);
		}
		bool newObjectIterator(_3DS_ObjectIterator&iter)const
		{
			return m_3ds.newObjectIterator(iter);
		}
		bool newTextureIterator(_3DS_TextureIterator&iter)const
		{
			return m_3ds.newTextureIterator(iter);
		}
	};
	I3DSFile::I3DSFile(void)
	{
		m_imp=new I3DSFile_imp;
	}


	I3DSFile::~I3DSFile(void)
	{
		delete m_imp;
	}

	bool I3DSFile::loadFromFile( const TCHAR*path )
	{
		return m_imp->loadFromFile(path);
	}

	bool I3DSFile::newObjectIterator( _3DS_ObjectIterator&iter ) const
	{
		return m_imp->newObjectIterator(iter);
	}

	bool I3DSFile::newTextureIterator( _3DS_TextureIterator&iter ) const
	{
		return m_imp->newTextureIterator(iter);
	}
}